package inter2;

/**
 * @classname:MyInterfaceImpl
 * @description:
 * @author: Mr.Z
 * @date: 2020/12/3 20:06
 * @version: 0.1
 * @since:1.8
 */
public class MyInterfaceImpl {
    public static void main(String[] args) {

//无参无返回值的lamda
//        MyInterface myInterface  = ()->{
//            System.out.println("s");
//        };
//        myInterface.add();


        //有参无返回值
//        MyInterface myInterface  = (a -> System.out.println(a));
//        myInterface.add(2);

//有返回值无参数
        MyInterface myInterface = () -> {
            System.out.println();
            return 2;
        };
        System.out.println(myInterface.add());

    }
}
